package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ResultingProducts generated by hbm2java
 */
@Entity
@Table(name="resulting_products"
    ,catalog="madr_bd10"
)
public class ResultingProducts  implements java.io.Serializable {


     private Integer idResPro;
     private String nameResPro;
     private Boolean statusResPro;
     private Set productions = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);

    public ResultingProducts() {
    }

    public ResultingProducts(String nameResPro, Boolean statusResPro, Set productions, Set cropsTypeses) {
       this.nameResPro = nameResPro;
       this.statusResPro = statusResPro;
       this.productions = productions;
       this.cropsTypeses = cropsTypeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_res_pro", unique=true, nullable=false)
    public Integer getIdResPro() {
        return this.idResPro;
    }
    
    public void setIdResPro(Integer idResPro) {
        this.idResPro = idResPro;
    }
    
    @Column(name="name_res_pro", length=45)
    public String getNameResPro() {
        return this.nameResPro;
    }
    
    public void setNameResPro(String nameResPro) {
        this.nameResPro = nameResPro;
    }
    
    @Column(name="status_res_pro")
    public Boolean getStatusResPro() {
        return this.statusResPro;
    }
    
    public void setStatusResPro(Boolean statusResPro) {
        this.statusResPro = statusResPro;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="resultingProducts")
    public Set getProductions() {
        return this.productions;
    }
    
    public void setProductions(Set productions) {
        this.productions = productions;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="resutling_products_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_resulting_product_res_pro_cro", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_res_pro_cro", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }




}


